package com.example.demo.model;

import com.example.demo.service.RandomStringService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Phone {

    private final String Imei;

    @Autowired
    public Phone(RandomStringService randomStringService) {
        this.Imei = randomStringService.getRandomString();
        System.out.println("Phone created with IMEI: " + this.Imei);
    }

    public String getImei() {
        return this.Imei;
    }
}

